import store from '@/vuex'

const hasRule = {
    install (Vue, options) {
		Vue.directive('rule', {
			bind: function(el, binding) {
			  if(store.state.rules.indexOf(binding.value) < 0){
				   //el.style.display = 'none';
				 el.parentNode.removeChild(el);
			  }
			}
		});
    }
};

export default hasRule;